Skip to content

feat: add value_bitmask_filter to the read API#16898

Merged
parthea merged 1 commit intomainfrom
add-bigtable-value_bitmask_filter
Apr 30, 2026
Merged

feat: add value_bitmask_filter to the read API#16898
parthea merged 1 commit intomainfrom
add-bigtable-value_bitmask_filter

Conversation

@parthea
Copy link
Copy Markdown
Contributor

@parthea parthea commented Apr 30, 2026

This PR was created outside of librarian due to b/501132869. b/501132869 should be resolved soon. In the meantime, we need to publish value_bitmask_filter to avoid blocking other teams.

Steps used to create this PR

  • Clone googleapis/googleapis and checkout the last generated commit a6cbf809c4c165e618ee23a059442af90a80a0f5 which matches what we have in .librarian/state.yaml

last_generated_commit: a6cbf809c4c165e618ee23a059442af90a80a0f5

  • Apply this diff
(py392) partheniou@partheniou-vm-3:~/git/googleapis$ git diff
diff --git a/google/bigtable/v2/data.proto b/google/bigtable/v2/data.proto
index 8320a0c22f..af354b05a2 100644
--- a/google/bigtable/v2/data.proto
+++ b/google/bigtable/v2/data.proto
@@ -255,6 +255,15 @@ message ValueRange {
   }
 }
 
+// Restricts the output to cells whose values match the given bitmask.
+message ValueBitmask {
+  // Required. Mask applied to the value.
+  // Evaluated as: `(value & mask) == mask`
+  // The mask length must exactly match the value length, otherwise the cell is
+  // not considered a match.
+  bytes mask = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
 // Takes a row as input and produces an alternate view of the row based on
 // specified rules. For example, a RowFilter might trim down a row to include
 // just the cells from columns matching a given regular expression, or might
@@ -514,6 +523,12 @@ message RowFilter {
     // will be applied to separate copies of the input. This may be relaxed in
     // the future.
     string apply_label_transformer = 19;
+
+    // Matches only cells with values that satisfy the condition `(value & mask)
+    // == mask`.
+    // The mask length must exactly match the value length, otherwise the cell
+    // is not considered a match.
+    ValueBitmask value_bitmask_filter = 20;
   }
 }

Closes #16884

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the ValueBitmask message type to the Bigtable V2 API, enabling bitmask-based cell value filtering. The new ValueBitmask class is defined in data.py and integrated into the RowFilter message as a value_bitmask_filter field within the filter oneof. Corresponding exports and imports have been updated across the package to support this new functionality. I have no feedback to provide.

@parthea parthea marked this pull request as ready for review April 30, 2026 18:31
@parthea parthea requested a review from a team as a code owner April 30, 2026 18:31
@parthea parthea enabled auto-merge (squash) April 30, 2026 18:40
@parthea parthea merged commit 5060696 into main Apr 30, 2026
33 checks passed
@parthea parthea deleted the add-bigtable-value_bitmask_filter branch April 30, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants